#! /usr/bin/bash
# @ Philip Russell

# Location of the 'java' command that you want to invoke.
# NOTE: JRE version >= 1.5 is REQUIRED
JAVA_BIN=`which java`

# The system location of the file StackAnalysis/vpc/ext/util/vdebug.properties
# CYGWIN NOTE: use the full Windows path surrounded by double quotes
DEBUG_FILEPATH="C:\cygwin\usr\project\sub\StackAnalysis\src\vpc\ext\stacksize\util\vdebug.properties"

# Options given to the JRE, including the location of the vdebug properties file
JAVA_OPTS="-Dvdebug.properties=$DEBUG_FILEPATH"

# Code entry point for the Virgil vpc compiler
ENTRYPOINT="vpc.Compiler"

# Which VPC scheduler to use
SCHEDULER="fixed"

# Which VPC Stages to run, in order
STAGES="virgil,init,mono,rma"

# Name of the StackAnalysis Stage in the VPC Registry mapping
STACKBOUND="vstack"

# Invoke the JRE with the given options, to start the VPC entrypoint with
# the stages argument and file arguments.
$JAVA_BIN $JAVA_OPTS $ENTRYPOINT -scheduler=$SCHEDULER -stages=$STAGES,$STACKBOUND $@
